/**
 * Created by hiibook on 2017/6/15.
 */
/**
 * Created by hiibook on 2017/6/15.
 */
var wechatMsgConstruct = require('./wechatMsgConstruct'); //消息构建器
module.exports = function (req, res, next) {
    if (req.wechatMsg.MsgType == "text") {
                    console.log('wechatDefault');
                    defaults(req, res, next);
    }

    function defaults(req, res, next) {

        var chat = {
            Type: "text",
            Content: require('../config/config').unShell
        };
        // 最后一步需要信息,并关闭数据库连接
        req.mysqlConnection.end();
        res.send(wechatMsgConstruct(req.wechatMsg, chat));

    }

};